#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

#include "zlib.h"

#define HTTP_COMPRESSALGORITHM_GZIP		MAX_WBITS+16

int test_deflateBound()
{
	z_stream	stream ;
	int		i , j ;
	
	int		nret = 0 ;
	
	stream.zalloc = NULL ;
	stream.zfree = NULL ;
	stream.opaque = NULL ;
	nret = deflateInit2( &stream , Z_DEFAULT_COMPRESSION , Z_DEFLATED , HTTP_COMPRESSALGORITHM_GZIP , MAX_MEM_LEVEL , Z_DEFAULT_STRATEGY ) ;
	if( nret != Z_OK )
	{
		printf( "deflateInit2 failed , errno[%d]\n" , errno );
		return -1;
	}
	
	for( i = 0 ; i < 64 ; i++ )
	{
		j = deflateBound( & stream , i ) ;
		printf( "[%d] = deflateBound[%d] ;\n" , j , i );
	}
	
	deflateEnd( & stream );
	
	return 0;
}

int main()
{
	return -test_deflateBound();
}

